package org.hnsd.train.pattern.observer;

/**
 * @author youqd
 * @tag.date 2023-11-07 22:59
 **/
public class ConcreteSubject extends Subject{
    @Override
    public void attach(Observer observer) {
        obsVector.add(observer);
    }

    @Override
    public void detach(Observer observer) {
        obsVector.remove(observer);
    }

    @Override
    public void notifyObserver() {
        for (Observer observer : obsVector) {
            observer.update();
        }
    }
}
